﻿using System;
using Terraria;
using Terraria.GameContent.ItemDropRules;
using Terraria.ID;
using Terraria.ModLoader;

namespace MoLingsArmory.Common.GlobalNPCs
{
    public class LootNPC : GlobalNPC
    {
        public override bool InstancePerEntity => true;
        protected override bool CloneNewInstances => true;
        public override void ModifyNPCLoot(NPC npc, NPCLoot npcLoot)
        {
            int[] targetNPCs = [NPCID.ScutlixRider, NPCID.GigaZapper, NPCID.MartianEngineer, NPCID.MartianOfficer, NPCID.RayGunner, NPCID.GrayGrunt, NPCID.BrainScrambler];
            if (Array.IndexOf(targetNPCs, npc.type) != -1)
            {
                npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<Content.Items.Weapons.Magic.DeathRay>(), 67));
            }
        }
    }
}
